<%= form_for(@stock_logging) do |f| %>
  <% if @stock_logging.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@stock_logging.errors.count, "error") %> prohibited this stock_logging from being saved:</h2>

      <ul>
      <% @stock_logging.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  
  <div class="field">
    <%= f.datetime_select :created_at, :type => "hidden" %>
  </div>
  <div class="field">
    <%= f.label :drug_id %><br>
    <%= f.collection_select(:drug_id, Drug.all, :id, :name, prompt: true) %>
  </div><div class="field">
  <div class="field">
    <%= f.label :inventory_id %><br>
    <%= f.collection_select(:inventory_id, Inventory.all, :id, :name, prompt: true) %>
  </div><div class="field">
    <%= f.label :quantity %><br>
    <%= f.text_field :quantity %>
  </div>
  <div class="field">
    <%= f.label :stock_logging_category_id %><br>
    <%= f.collection_select(:stock_logging_category_id, StockLoggingCategory.all, :id, :name, prompt: true) %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
